// zh_gjw/pages/corder/corder.js
Page({

  /**
   * 页面的初始数据
   */
	data: {
		pagedbn: 1,
		pagedbp: 1,
		pagedbw: 1,
		pagedbo: 1,
		pagedbl: 1,
		pageshotn: 1,
		pageshotp: 1,
		pageshotw: 1,
		pageshoto: 1,
		pageshotl: 1,
		pagemarketn: 1,
		pagemarketp: 1,
		pagemarketw: 1,
		pagemarketo: 1,
		pagemarketl: 1,
		pagestoren: 1,
		pagestorep: 1,
		pagestorew: 1,
		pagestoreo: 1,
		pagestorel: 1,
		pageprin: 1,
		pageprip: 1,
		pagepriw: 1,
		pageprio: 1,
		pagepril: 1,
		excate: ['快递', '物流'],
		exindex: 0,
		show:0
	},

  /**
   * 生命周期函数--监听页面加载
   */
	onLoad: function (options) {
		var that = this
		getApp().location_attachurl(this)
		getApp().location_url(this)
		if (options.orderdb =='orderdb'){
			getApp().util.request({
				'url': 'entry/wxapp/Cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 1, page: that.data.pagedbn, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					
					if (res.data.code == 500) {
						that.setData({
							orderdblist: []
						})
					}
					if (res.data.code == 200) {
						that.setData({
							orderdblist: res.data.res,
						})
					}
				}
			});
			that.setData({
				orderdb:'orderdb',
				orderdbn:'active',
				nonedb: '',
				noneshot: 'none',
				nonemarket: 'none',
				nonestore: 'none',
				nonepri: 'none',
				mmtype:1
			})
		} 
		if (options.ordershot == 'ordershot') {
			getApp().util.request({
				'url': 'entry/wxapp/Cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 2, page: that.data.pageshotn, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if(res.data.code==500){
						that.setData({
							ordershotlist:[]
						})
					}
					if(res.data.code==200){
						that.setData({
							ordershotlist: res.data.res,
						})
					}
				}
			});
			that.setData({
				ordershot: 'ordershot',
				ordershotn: 'active',
				nonedb: 'none',
				noneshot: '',
				nonemarket: 'none',
				nonestore: 'none',
				nonepri: 'none',
				mmtype: 2
			})
		} 
		if (options.ordermarket == 'ordermarket') {
			getApp().util.request({
				'url': 'entry/wxapp/Cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 3, page: that.data.pagemarketn, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						that.setData({
							ordermarketlist: []
						})
					}
					if (res.data.code == 200) {
						that.setData({
							ordermarketlist: res.data.res,
						})
					}
				}
			});
			that.setData({
				ordermarket: 'ordermarket',
				ordermarketn: 'active',
				nonedb: 'none',
				noneshot: 'none',
				nonemarket: '',
				nonestore: 'none',
				nonepri: 'none',
				mmtype: 3
			})
		} 
		if (options.orderstore == 'orderstore') {
			getApp().util.request({
				'url': 'entry/wxapp/Cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 4, page: that.data.pagestoren, openid: wx.getStorageSync('openid') },
				success: function (res) {
					

					if (res.data.code == 500) {
						that.setData({
							orderstorelist: []
						})
					}
					if (res.data.code == 200) {
						that.setData({
							orderstorelist: res.data.res,
						})
					}
				}
			});
			that.setData({
				orderstore: 'orderstore',
				orderstoren: 'active',
				nonedb: 'none',
				noneshot: 'none',
				nonemarket: 'none',
				nonestore: '',
				nonepri: 'none',
				mmtype: 4
			})
		} 
		if (options.orderpri == 'orderpri') {
			getApp().util.request({
				'url': 'entry/wxapp/Cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 5, page: that.data.pageprin, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						that.setData({
							orderprilist: []
						})
					}
					if (res.data.code == 200) {
						that.setData({
							orderprilist: res.data.res,
						})
					}
				}
			});
			that.setData({
				orderpri: 'orderpri',
				orderprin: 'active',
				nonedb: 'none',
				noneshot: 'none',
				nonemarket: 'none',
				nonestore: 'none',
				nonepri: '',
				mmtype: 5
			})
		}
		
	},

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
	onReady: function () {

	},

  /**
   * 生命周期函数--监听页面显示
   */
	onShow: function () {

	},

  /**
   * 生命周期函数--监听页面隐藏
   */
	onHide: function () {

	},

  /**
   * 生命周期函数--监听页面卸载
   */
	onUnload: function () {

	},

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
	onPullDownRefresh: function () {

	},

  /**
   * 页面上拉触底事件的处理函数
   */
	onReachBottom: function () {
		var that = this
		if (that.data.orderdbn == 'active' && that.data.orderdb =='orderdb') {
			that.data.pagedbn = that.data.pagedbn + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 1, page: that.data.pagedbn, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderdblist.push(res.data.res[j])
						}
						that.setData({
							orderdblist: that.data.orderdblist
						})
					}
				}
			});
		}
		if (that.data.orderdbp == 'active' && that.data.orderdb == 'orderdb') {
			that.data.pagedbp = that.data.pagedbp + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 2, mtype: 1, page: that.data.pagedbp, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderdblist.push(res.data.res[j])
						}
						that.setData({
							orderdblist: that.data.orderdblist
						})
					}
				}
			});
		}
		if (that.data.orderdbw == 'active' && that.data.orderdb == 'orderdb') {
			that.data.pagedbw = that.data.pagedbw + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 3, mtype: 1, page: that.data.pagedbw, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderdblist.push(res.data.res[j])
						}
						that.setData({
							orderdblist: that.data.orderdblist
						})
					}
				}
			});
		}
		if (that.data.orderdbo == 'active' && that.data.orderdb == 'orderdb') {
			that.data.pagedbo = that.data.pagedbo + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 4, mtype: 1, page: that.data.pagedbo, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderdblist.push(res.data.res[j])
						}
						that.setData({
							orderdblist: that.data.orderdblist
						})
					}
				}
			});
		}
		if (that.data.orderdbl == 'active' && that.data.orderdb == 'orderdb') {
			that.data.pagedbl = that.data.pagedbl + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 5, mtype: 1, page: that.data.pagedbl, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderdblist.push(res.data.res[j])
						}
						that.setData({
							orderdblist: that.data.orderdblist
						})
					}
				}
			});
		}
		if (that.data.ordershotn == 'active' && that.data.ordershot == 'ordershot') {
			that.data.pageshotn = that.data.pageshotn + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 2, page: that.data.pageshotn, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordershotlist.push(res.data.res[j])
						}
						that.setData({
							ordershotlist: that.data.ordershotlist
						})
					}
				}
			});
		}
		if (that.data.ordershotp == 'active' && that.data.ordershot == 'ordershot') {
			that.data.pageshotp = that.data.pageshotp + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 2, mtype: 2, page: that.data.pageshotp, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordershotlist.push(res.data.res[j])
						}
						that.setData({
							ordershotlist: that.data.ordershotlist
						})
					}
				}
			});
		}
		if (that.data.ordershotw == 'active' && that.data.ordershot == 'ordershot') {
			that.data.pageshotw = that.data.pageshotw + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 3, mtype: 2, page: that.data.pageshotw, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordershotlist.push(res.data.res[j])
						}
						that.setData({
							ordershotlist: that.data.ordershotlist
						})
					}
				}
			});
		}
		if (that.data.ordershoto == 'active' && that.data.ordershot == 'ordershot') {
			that.data.pageshoto = that.data.pageshoto + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 4, mtype: 2, page: that.data.pageshoto, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordershotlist.push(res.data.res[j])
						}
						that.setData({
							ordershotlist: that.data.ordershotlist
						})
					}
				}
			});
		}
		if (that.data.ordershotl == 'active' && that.data.ordershot == 'ordershot') {
			that.data.pageshotl = that.data.pageshotl + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 5, mtype: 2, page: that.data.pageshotl, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordershotlist.push(res.data.res[j])
						}
						that.setData({
							ordershotlist: that.data.ordershotlist
						})
					}
				}
			});
		}
		if (that.data.ordermarketn == 'active' && that.data.ordermarket == 'ordermarket') {
			that.data.pagemarketn = that.data.pagemarketn + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 3, page: that.data.pagemarketn, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordermarketlist.push(res.data.res[j])
						}
						that.setData({
							ordermarketlist: that.data.ordermarketlist
						})
					}
				}
			});
		}
		if (that.data.ordermarketp == 'active' && that.data.ordermarket == 'ordermarket') {
			that.data.pagemarketp = that.data.pagemarketp + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 2, mtype: 3, page: that.data.pagemarketp, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordermarketlist.push(res.data.res[j])
						}
						that.setData({
							ordermarketlist: that.data.ordermarketlist
						})
					}
				}
			});
		}
		if (that.data.ordermarketw == 'active' && that.data.ordermarket == 'ordermarket') {
			that.data.pagemarketw = that.data.pagemarketw + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 3, mtype: 3, page: that.data.pagemarketw, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordermarketlist.push(res.data.res[j])
						}
						that.setData({
							ordermarketlist: that.data.ordermarketlist
						})
					}
				}
			});
		}
		if (that.data.ordermarketo == 'active' && that.data.ordermarket == 'ordermarket') {
			that.data.pagemarketo = that.data.pagemarketo + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 4, mtype: 3, page: that.data.pagemarketo, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordermarketlist.push(res.data.res[j])
						}
						that.setData({
							ordermarketlist: that.data.ordermarketlist
						})
					}
				}
			});
		}
		if (that.data.ordermarketl == 'active' && that.data.ordermarket == 'ordermarket') {
			that.data.pagemarketl = that.data.pagemarketl + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 5, mtype: 3, page: that.data.pagemarketl, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.ordermarketlist.push(res.data.res[j])
						}
						that.setData({
							ordermarketlist: that.data.ordermarketlist
						})
					}
				}
			});
		}

		if (that.data.orderstoren == 'active' && that.data.orderstore == 'orderstore') {
			that.data.pagestoretn = that.data.pagestoren + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 4, page: that.data.pagestoren, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderstorelist.push(res.data.res[j])
						}
						that.setData({
							orderstorelist: that.data.orderstorelist
						})
					}
				}
			});
		}
		if (that.data.orderstorep == 'active' && that.data.orderstore == 'orderstore') {
			that.data.pagestorep = that.data.pagestorep + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 2, mtype: 4, page: that.data.pagestorep, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderstorelist.push(res.data.res[j])
						}
						that.setData({
							orderstorelist: that.data.orderstorelist
						})
					}
				}
			});
		}
		if (that.data.orderstorew == 'active' && that.data.orderstore == 'orderstore') {
			that.data.pagestorew = that.data.pagestorew + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 3, mtype: 4, page: that.data.pagestorew, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderstorelist.push(res.data.res[j])
						}
						that.setData({
							orderstorelist: that.data.orderstorelist
						})
					}
				}
			});
		}
		if (that.data.orderstoreo == 'active' && that.data.orderstore == 'orderstore') {
			that.data.pagestoreo = that.data.pagestoreo + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 4, mtype: 4, page: that.data.pagestoreo, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderstorelist.push(res.data.res[j])
						}
						that.setData({
							orderstorelist: that.data.orderstorelist
						})
					}
				}
			});
		}
		if (that.data.orderstorel == 'active' && that.data.orderstore == 'orderstore') {
			that.data.pagestorel = that.data.pagestorel + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 5, mtype: 4, page: that.data.pagestorel, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderstorelist.push(res.data.res[j])
						}
						that.setData({
							orderstorelist: that.data.orderstorelist
						})
					}
				}
			});
		}
		if (that.data.orderprin == 'active' && that.data.orderpri == 'orderpri') {
			that.data.pageprin = that.data.pageprin + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 1, mtype: 5, page: that.data.pageprin, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderprilist.push(res.data.res[j])
						}
						that.setData({
							orderprilist: that.data.orderprilist
						})
					}
				}
			});
		}
		if (that.data.orderprip == 'active' && that.data.orderpri == 'orderpri') {
			that.data.pageprip = that.data.pageprip + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 2, mtype: 5, page: that.data.pageprip, openid: wx.getStorageSync('openid') },
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderprilist.push(res.data.res[j])
						}
						that.setData({
							orderprilist: that.data.orderprilist
						})
					}
				}
			});
		}
		if (that.data.orderpriw == 'active' && that.data.orderpri == 'orderpri') {
			that.data.pagepriw = that.data.pagepriw + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 3, mtype: 5, page: that.data.pagepriw, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderprilist.push(res.data.res[j])
						}
						that.setData({
							orderprilist: that.data.orderprilist
						})
					}
				}
			});
		}
		if (that.data.orderprio == 'active' && that.data.orderpri == 'orderpri') {
			that.data.pageprio = that.data.pageprio + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 4, mtype: 5, page: that.data.pageprio, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderprilist.push(res.data.res[j])
						}
						that.setData({
							orderprilist: that.data.orderprilist
						})
					}
				}
			});
		}
		if (that.data.orderpril == 'active' && that.data.orderpri == 'orderpri') {
			that.data.pagepril = that.data.pagepril + 1
			getApp().util.request({
				'url': 'entry/wxapp/cusorders',
				'cachetime': '0',
				data: { state: 5, mtype: 5, page: that.data.pagepril, openid: wx.getStorageSync('openid')},
				success: function (res) {
					
					if (res.data.code == 500) {
						wx.showToast({
							title: '没有新的数据了！',
							icon: 'none'
						})
					}
					if (res.data.code == 200) {
						for (var j = 0; j < res.data.res.length; j++) {
							that.data.orderprilist.push(res.data.res[j])
						}
						that.setData({
							orderprilist: that.data.orderprilist
						})
					}
				}
			});
		}
	},

  /**
   * 用户点击右上角分享
   */
	onShareAppMessage: function () {

	},
	// 获取滚动条当前位置
	onPageScroll: function (e) {
		
	},
	orderdbn:function(){
		var that=this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagedbn = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 1, mtype: 1, page: that.data.pagedbn, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
					that.setData({
						orderdblist: []
					})
				}
				if (res.data.code == 200) {
					that.data.orderdblist.splice(0)
					that.setData({
						orderdblist:res.data.res
					})
				}
			}
		});
		that.setData({
			orderdbn: 'active',
			orderdbp: '',
			orderdbw: '',
			orderdbo: '',
			orderdbl: '',
		})
	},
	orderdbp: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagedbp = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 2, mtype: 1, page: that.data.pagedbp, openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
					that.setData({
						orderdblist: []
					})
				}
				if (res.data.code == 200) {
					that.data.orderdblist.splice(0)
					that.setData({
						orderdblist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderdbn: '',
			orderdbp: 'active',
			orderdbw: '',
			orderdbo: '',
			orderdbl: '',
		})
	},
	orderdbw: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagedbw = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 3, mtype: 1, page: that.data.pagedbw, openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
					that.setData({
						orderdblist: []
					})
				}
				if (res.data.code == 200) {
					that.data.orderdblist.splice(0)
					that.setData({
						orderdblist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderdbn: '',
			orderdbp: '',
			orderdbw: 'active',
			orderdbo: '',
			orderdbl: '',
		})
	},
	orderdbo: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagedbo = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 4, mtype: 1, page: that.data.pagedbo, openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
					that.setData({
						orderdblist: []
					})
				}
				if (res.data.code == 200) {
					that.data.orderdblist.splice(0)
					that.setData({
						orderdblist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderdbn: '',
			orderdbp: '',
			orderdbw: '',
			orderdbo: 'active',
			orderdbl: '',
		})
	},
	orderdbl: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagedbl = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 5, mtype: 1, page: that.data.pagedbl, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
					that.setData({
						orderdblist: []
					})
				}
				if (res.data.code == 200) {
					that.data.orderdblist.splice(0)
					that.setData({
						orderdblist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderdbn: '',
			orderdbp: '',
			orderdbw: '',
			orderdbo: '',
			orderdbl: 'active',
		})
	},
	ordershotn: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pageshotn = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 1, mtype: 2, page: that.data.pageshotn, openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
					that.setData({
						ordershotlist: []
					})
				}
				if (res.data.code == 200) {
					that.data.ordershotlist.splice(0)
					that.setData({
						ordershotlist: res.data.res
					})
				}
			}
		});
		that.setData({
			ordershotn: 'active',
			ordershotp: '',
			ordershotw: '',
			ordershoto: '',
			ordershotl: '',
		})
	},
	ordershotp: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pageshotp = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 2, mtype: 2, page: that.data.pageshotp, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordershotlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordershotlist.splice(0)
					that.setData({
						ordershotlist: res.data.res
					})
				}
			}
		});
		that.setData({
			ordershotn: '',
			ordershotp: 'active',
			ordershotw: '',
			ordershoto: '',
			ordershotl: '',
		})
	},
	ordershotw: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pageshotw = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 3, mtype: 2, page: that.data.pageshotw, openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordershotlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordershotlist.splice(0)
					that.setData({
						ordershotlist: res.data.res
					})
				}
			}
		});
		that.setData({
			ordershotn: '',
			ordershotp: '',
			ordershotw: 'active',
			ordershoto: '',
			ordershotl: '',
		})
	},
	ordershoto: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pageshoto = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 4, mtype: 2, page: that.data.pageshoto, openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordershotlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordershotlist.splice(0)
					that.setData({
						ordershotlist: res.data.res
					})
				}
			}
		});
		that.setData({
			ordershotn: '',
			ordershotp: '',
			ordershotw: '',
			ordershoto: 'active',
			ordershotl: '',
		})
	},
	ordershotl: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pageshotl = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 5, mtype: 2, page: that.data.pageshotl, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordershotlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordershotlist.splice(0)
					that.setData({
						ordershotlist: res.data.res
					})
				}
			}
		});
		that.setData({
			ordershotn: '',
			ordershotp: '',
			ordershotw: '',
			ordershoto: '',
			ordershotl: 'active',
		})
	}, 
	marout: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		getApp().util.request({
			'url': 'entry/wxapp/Mymarketings',
			'cachetime': '0',
			data: {openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordermarketlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordermarketlist.splice(0)
					if (res.data.res.length>0){
						for (var j = 0; j < res.data.res.length; j++) {
							res.data.res[j].img = res.data.res[j].img.split(",")
						}
						that.setData({ ordermarketlist: res.data.res })
						
						//that.countdown()
					}
				}
			}
		});
		that.setData({
			marout:'active',
			ordermarketn: '',
			ordermarketp: '',
			ordermarketw: '',
			ordermarketo: '',
			ordermarketl: '',
		})
	},
	ordermarketn: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagemarketn = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 1, mtype: 3, page: that.data.pagemarketn, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordermarketlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordermarketlist.splice(0)
					that.setData({
						ordermarketlist: res.data.res
					})
				}
			}
		});
		that.setData({
			marout: '',
			ordermarketn: 'active',
			ordermarketp: '',
			ordermarketw: '',
			ordermarketo: '',
			ordermarketl: '',
		})
	},
	ordermarketp: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagemarketp = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 2, mtype: 3, page: that.data.pagemarketp, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordermarketlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordermarketlist.splice(0)
					that.setData({
						ordermarketlist: res.data.res
					})
				}
			}
		});
		that.setData({
			marout: '',
			ordermarketn: '',
			ordermarketp: 'active',
			ordermarketw: '',
			ordermarketo: '',
			ordermarketl: '',
		})
	},
	ordermarketw: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagemarketw = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 3, mtype: 3, page: that.data.pagemarketw, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordermarketlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordermarketlist.splice(0)
					that.setData({
						ordermarketlist: res.data.res
					})
				}
			}
		});
		that.setData({
			marout: '',
			ordermarketn: '',
			ordermarketp: '',
			ordermarketw: 'active',
			ordermarketo: '',
			ordermarketl: '',
		})
	},
	ordermarketo: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagemarketo = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 4, mtype: 3, page: that.data.pagemarketo, openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordermarketlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordermarketlist.splice(0)
					that.setData({
						ordermarketlist: res.data.res
					})
				}
			}
		});
		that.setData({
			marout: '',
			ordermarketn: '',
			ordermarketp: '',
			ordermarketw: '',
			ordermarketo: 'active',
			ordermarketl: '',
		})
	},
	ordermarketl: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagemarketl = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 5, mtype: 3, page: that.data.pagemarketl, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						ordermarketlist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.ordermarketlist.splice(0)
					that.setData({
						ordermarketlist: res.data.res
					})
				}
			}
		});
		that.setData({
			marout: '',
			ordermarketn: '',
			ordermarketp: '',
			ordermarketw: '',
			ordermarketo: '',
			ordermarketl: 'active',
		})
	},
	orderstoren: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagestoren = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 1, mtype: 4, page: that.data.pagestoren, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
					that.setData({
						orderstorelist: []
					})
				}
				if (res.data.code == 200) {
					that.data.orderstorelist.splice(0)
					that.setData({
						orderstorelist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderstoren: 'active',
			orderstorep: '',
			orderstorew: '',
			orderstoreo: '',
			orderstorel: '',
		})
	},
	orderstorep: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagestorep = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 2, mtype: 4, page: that.data.pagestorep, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						orderstorelist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.orderstorelist.splice(0)
					that.setData({
						orderstorelist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderstoren: '',
			orderstorep: 'active',
			orderstorew: '',
			orderstoreo: '',
			orderstorel: '',
		})
	},
	orderstorew: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagestorew = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 3, mtype: 4, page: that.data.pagestorew, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						orderstorelist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.orderstorelist.splice(0)
					that.setData({
						orderstorelist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderstoren: '',
			orderstorep: '',
			orderstorew: 'active',
			orderstoreo: '',
			orderstorel: '',
		})
	},
	orderstoreo: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagestoreo = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 4, mtype: 4, page: that.data.pagestoreo, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						orderstorelist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.orderstorelist.splice(0)
					that.setData({
						orderstorelist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderstoren: '',
			orderstorep: '',
			orderstorew: '',
			orderstoreo: 'active',
			orderstorel: '',
		})
	},
	orderstorel: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagestorel = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 5, mtype: 4, page: that.data.pagestorel, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						orderstorelist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.orderstorelist.splice(0)
					that.setData({
						orderstorelist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderstoren: '',
			orderstorep: '',
			orderstorew: '',
			orderstoreo: '',
			orderstorel: 'active',
		})
	},
	orderprin: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pageprin = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 1, mtype: 5, page: that.data.pageprin, openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						orderprilist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.orderprilist.splice(0)
					that.setData({
						orderprilist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderprin: 'active',
			orderprip: '',
			orderpriw: '',
			orderprio: '',
			orderpril: '',
		})
	},
	orderprip: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pageprip = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 2, mtype: 5, page: that.data.pageprip, openid: wx.getStorageSync('openid')},
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						orderprilist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.orderprilist.splice(0)
					that.setData({
						orderprilist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderprin: '',
			orderprip: 'active',
			orderpriw: '',
			orderprio: '',
			orderpril: '',
		})
	},
	orderpriw: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagepriw = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 3, mtype: 5, page: that.data.pagepriw, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						orderprilist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.orderprilist.splice(0)
					that.setData({
						orderprilist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderprin: '',
			orderprip: '',
			orderpriw: 'active',
			orderprio: '',
			orderpril: '',
		})
	},
	orderprio: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pageprio = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 4, mtype: 5, page: that.data.pageprio, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						orderprilist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.orderprilist.splice(0)
					that.setData({
						orderprilist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderprin: '',
			orderprip: '',
			orderpriw: '',
			orderprio: 'active',
			orderpril: '',
		})
	},
	orderpril: function () {
		var that = this
		if (wx.pageScrollTo) {
			wx.pageScrollTo({
				scrollTop: 0
			})
		}
		that.data.pagepril = 1
		getApp().util.request({
			'url': 'entry/wxapp/cusorders',
			'cachetime': '0',
			data: { state: 5, mtype: 5, page: that.data.pagepril, openid: wx.getStorageSync('openid') },
			success: function (res) {
				
				if (res.data.code == 500) {
					that.setData({
						orderprilist: []
					})
					wx.showToast({
						title: '没有新的数据了！',
						icon: 'none'
					})
				}
				if (res.data.code == 200) {
					that.data.orderprilist.splice(0)
					that.setData({
						orderprilist: res.data.res
					})
				}
			}
		});
		that.setData({
			orderprin: '',
			orderprip: '',
			orderpriw: '',
			orderprio: '',
			orderpril: 'active',
		})
	},
	nextto: function (e) {
		var that = this
		
		wx.navigateTo({
			url: '/zh_gjw/pages/codetail/codetail?id=' + e.currentTarget.dataset.id,
		})
	},
	cusfh:function(e){
		var that=this
		that.setData({
			show:1,
			fhid: e.currentTarget.dataset.id,
			index: e.currentTarget.dataset.index
		})
		
		
	},
	bindPickerChange: function (e) {
		var that = this
		this.setData({
			exindex: e.detail.value,
		})
	}, 
	formSubmit:function(e){
		var that=this
		getApp().util.request({
			'url': 'entry/wxapp/Cusfh',
			'cachetime': '0',
			data: { res_id: that.data.fhid, formid: e.detail.formId, excompany: e.detail.value.excompany, exordernum: e.detail.value.exordernum, excompanys: e.detail.value.excompanys, exordernums: e.detail.value.exordernums },
			success: function (res) {
				
				if (res.data.code == 200) {
					if(that.data.mmtype==1){
						that.data.orderdblist.splice(that.data.index, 1)
						that.setData({
							orderdblist: that.data.orderdblist,
							show: 0
						})
					} else if (that.data.mmtype == 2) {
						that.data.ordershotlist.splice(that.data.index, 1)
						that.setData({
							ordershotlist: that.data.ordershotlist,
							show: 0
						})
					} else if (that.data.mmtype == 3) {
						that.data.ordermarketlist.splice(that.data.index, 1)
						that.setData({
							ordermarketlist: that.data.ordermarketlist,
							show: 0
						})
					} else if (that.data.mmtype == 4) {
						that.data.orderstorelist.splice(that.data.index, 1)
						that.setData({
							orderstorelist: that.data.orderstorelist,
							show: 0
						})
					} else if (that.data.mmtype == 5) {
						that.data.orderprilist.splice(that.data.index, 1)
						that.setData({
							orderprilist: that.data.orderprilist,
							show: 0
						})
					}
					wx.showToast({
						title: '成功！',
						icon: 'none'
					})
				}else{
					wx.showToast({
						title: '出现未知错误！',
						icon: 'none'
					})
				}
			}
		})
	},
	lookassess:function(e){
		var that=this
		
		wx.navigateTo({
			url: '/zh_gjw/pages/lookassess/lookassess?id=' + e.currentTarget.dataset.id,
		})
	},
	countdown: function () {
		var that = this
		var NowTime = Math.round(new Date().getTime() / 1000)
		var total_micro_second=[]
		for (var j = 0; j < that.data.ordermarketlist.length; j++) {
			var tmd = that.data.ordermarketlist[j].totimesjc - NowTime
			total_micro_second[j] = tmd.toString()
		}
		setTimeout(function () {
			that.countdown();
		}, 1000)
	},
	dateformat: function (e) {
		
		for(var i=0;i<e.length;i++){
			e[i]=Number(e[i])	
		}
		var that = this
		var second = []
		var day = []
		var hr = []
		var min = []
		var sec = []
		for (var j = 0; j < e.length; j++) {
			second[j] = Math.floor(e[j]);
			day[j] = Math.floor(second[j] / 3600 / 24);
			hr[j] = Math.floor(second[j] / 3600 % 24);
			min[j] = Math.floor(second[j] / 60 % 60);
			sec[j] = Math.floor(second[j] % 60);
			if (day[j] < 10) {
				day[j] = '0' + day[j]
			}
			if (hr[j] < 10) {
				hr[j] = '0' + hr[j]
			}
			if (sec[j] < 10) {
				sec[j] = '0' + sec[j]
			}
			if (min[j] < 10) {
				min[j] = '0' + min[j]
			}
			that.data.ordermarketlist[j] = that.data.ordermarketlist[j] + day[j] + hr[j] + sec[j] + min[j]
		}
		that.setData({
			ordermarketlist: that.data.ordermarketlist
		})
	},
	outall:function(e){
		
		wx.navigateTo({
			url: '/zh_gjw/pages/marout/marout?id=' + e.currentTarget.dataset.id
		})
	}
})